/**
 * 1817. 查找用户活跃分钟数
 * @param {number[][]} logs
 * @param {number} k
 * @return {number[]}
 */
var findingUsersActiveMinutes = function (logs, k) {
	const activMinutes = new Map()
	for (const [id, time] of logs) {
		if (!activMinutes.has(id)) {
			activMinutes.set(id, new Set())
		}
		activMinutes.get(id).add(time)
	}
	const answer = new Array(k).fill(0)
	for (const minutes of activMinutes.values()) {
		// 对应活跃分钟数的用户数
		const activeCount = minutes.size
		// 转换索引
		answer[activeCount - 1]++
	}
	return answer
}
findingUsersActiveMinutes(
	[
		[0, 5],
		[1, 2],
		[0, 2],
		[0, 5],
		[1, 3],
	],
	5
)
